﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace Love.Awesome.TMX
{
    [XmlType("tileset")]
    public class TileSet : MapChild
    {
        [XmlAttribute("firstgid")]
        public int FirstGID;

        [XmlAttribute("source")]
        public string Source;

        [XmlAttribute("name")]
        public string Name;

        [XmlAttribute("class")]
        public string Class;

        [XmlAttribute("tilewidth")]
        public int TileWidth;

        [XmlAttribute("tileheight")]
        public int TileHeight;

        [XmlAttribute("spacing")]
        public int Spacing;

        [XmlAttribute("margin")]
        public int Margin;

        [XmlAttribute("tilecount")]
        public int TileCount;

        [XmlAttribute("columns")]
        public int Columns;

        [XmlAttribute("objectalignment")]
        public ObjectAlignmentEnum ObjectAlignment;

        [XmlAttribute("tilerendersize")]
        public TileRenderSizeEnum TileRenderSize;

        [XmlElement("image")]
        public Image Image;

        [XmlElement("tileoffset")]
        public TileOffset TileOffset;

        [XmlElement("grid")]
        public Grid Grid;

        [XmlElement("properties")]
        public Properties Properties;

        [XmlElement("transformations")]
        public Transformations Transformations;

        [XmlElement("tile")]
        public List<Tile> Tiles;

        public TileSet()
        {
            Tiles = new List<Tile>();
        }

    }
}
